export const defaultSortStrategy = 'praise'

export const Status = {
  Normal: '0',
  Locked: '1',
  Repair: '2',
  Forbidden: '100'
}

export const StatusList = [
  {
    value: '0',
    label: '正常'
  },
  {
    value: '1',
    label: '锁定'
  },
  {
    value: '2',
    label: '维修'
  },
  {
    value: '100',
    label: '禁用'
  }
]

export const sortStrategyList = [
  { label: '智能排序', value: 'auto' },
  { label: '好评优先', value: 'praise' },
  { label: '销量最高', value: 'sell' },
  { label: '价格最低', value: 'price' }
]

export const examineStatus = {
  // 未审核
  NOT_REVIEWED: 0,
  // 审核中
  REVIEWING: 1,
  // 审核通过
  REVIEW_PASS: 2,
  // 审核拒绝
  REVIEW_NOT_PASS: 3
}

export const fuelTypeList = [
  { label: '柴油', value: 0 },
  { label: '汽油', value: 1 },
  { label: '电动', value: 2 },
  { label: '插电混动', value: 3 },
  { label: '油电混合', value: 4 },
  { label: '氢燃料电池', value: 5 },
  { label: '液化石油气', value: 6 },
  { label: '油气混合', value: 7 }
]

export const carDegreeList = [
  { label: '普通', value: 1 },
  { label: '中级', value: 2 },
  { label: '高一', value: 3 },
  { label: '高二', value: 4 },
  { label: '高三', value: 5 }
]

export function formatAutoClassLabel(autoClass) {
  for (let i = 0; i < carDegreeList.length; i++) {
    const item = carDegreeList[i]
    if (autoClass == item.value) return item.label
  }
  return ''
}

export const vehicleStatus = [
  { label: '待命', value: 0, type: 'primary' },
  { label: '锁定', value: 1, type: 'error' },
  { label: '维修', value: 2, type: 'warning' },
  { label: '出行', value: 3, type: 'success' },
  { label: '有单', value: 5, type: 'success' },
  { label: '无人', value: 10, type: 'secondary' },
  { label: '禁用', value: 100, type: 'error' }
]
